import { createRouter, createWebHistory } from "vue-router";
const routes = [
  {
    path: "/index",
    name: "Index",
    meta: {
      title: "首页",
      keepAlive: true,
      requireAuth: false,
    },
    component: () => import("@/pages/index.vue"),
  },
  {
    path: "/todo",
    name: "ToDo",
    meta: {
      title: "todo",
      keepAlive: true,
      requireAuth: false,
    },
    component: () => import("@/pages/todo.vue"),
  },
  {
    path: "/",
    redirect: "/index",
  },
];

const router = createRouter({
  history: createWebHistory(),
  routes,
});
export default router;
